package com.xcity.pomelo.response;

import java.util.Collections;
import java.util.List;

import com.xcity.db.entity.Player;
import com.xcity.db.entity.Ranking;
import com.xcity.game.item.ItemInfo;
import com.xcity.game.worldboss.template.WorldBossRankingRewardTemplate;
import com.xcity.util.SimplePlayer;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.protocol.Message;

@PomeloMessage(type = Message.Type.RESPONSE)
public class WorldBossInfoResponse extends Response {
	
	/** boss等级 */
	public int level;
	/** boss名称 */
	public String name;
	/** boss头像 */
	public String icon;
	/** boss战斗力 */
	public int combatPower;
	/** boss当前剩余血量 */
	public long hp;
	/** boss最大血量 */
	public long maxHp;
	
	/** 剩余挑战次数 */
	public int num;
	/** 最大挑战次数 */
	public int maxNum;
	/** 挑战次数恢复cd（秒） */
	public int cd;
	/** 获得积分 */
	public int score;
	/** 排名（-1：未进入排行榜） */
	public int ranking = -1;
	/** 我的排行奖励 */
	public List<ItemInfo> rewards = Collections.emptyList();
//	/** 我的排行 */
//	public List<RankingItem> nearbyRankingList = Collections.emptyList();
	/** 排行榜 */
	public List<RankingItem> rankingList = Collections.emptyList();
	/** 排行榜奖励 */
	public List<WorldBossRankingRewardTemplate> rankingRewards;
	
	public WorldBossInfoResponse(int serial) {
		super(serial);
	}
	
	public static class RankingItem extends SimplePlayer {

		public int ranking;
		public int score;
		
		public RankingItem(Player player, Ranking r) {
			super(player);
			this.ranking = r.getIndex() + 1;
			this.score = (int) r.getValue();
		}
		
	}
	
//	public static class RankingReward {
//		public int rankingFrom;
//		public int rankingTo;
//		public List<ItemInfo> items;
//	}

}
